package com.starview.star.compiler.util;

/**
 * Use this enumeration to distinguish readWrite from readOnly.
 * 
 * @author fgm
 */
public enum AccessMode implements PrettyPrintable {
  readWrite {
    @Override
    public AccessMode downGrade()
    {
      return this;
    }
  },
  readOnly {
    @Override
    public AccessMode downGrade()
    {
      return this;
    }
  },
  unknown {
    @Override
    public AccessMode downGrade()
    {
      return this;
    }
  };

  @Override
  public void prettyPrint(PrettyPrintDisplay disp)
  {
    disp.appendWord(this.name());
  }

  public abstract AccessMode downGrade();
}
